import http from '../utils/http.js'

// 新建收货地址
export const reqAddAddress = (data) => {
  return http.post('/userAddress/save', data)
}

// 收货地址列表
export const reqAddressList = () => {
  return http.get('/userAddress/findUserAddress/list')
}

// 收货地址详情
export const reqAddressDetail = (id) => {
  return http.get(`/userAddress/${id}`)
}

// 更新收货地址
export const reqUpdateAddress = (data) => {
  return http.put('/userAddress/update', data)
}

// 删除收货地址
export const reqDeleteAddress = (id) => {
  return http.delete(`/userAddress/delete/${id}`)
}